//package Formularios;
//
//import Formularios.FormaInterior;
//import java.awt.CardLayout;
//import java.awt.event.ItemEvent;
//import java.text.DecimalFormat;
//import javax.swing.JOptionPane;
//import javax.swing.UIManager;
//import javax.swing.table.DefaultTableModel;
//import produccion.Libro;
//
///**
// *
// * @author PRE PRENSA01
// */
//public class Reporte extends javax.swing.JFrame {
//
//    /**
//     * Creates new form Reporte
//     */
//    
//    FormaInterior forma = new FormaInterior();
//    private Libro libro;
//    
//       
//    public Reporte() {
//        initComponents();
//    }
//
//    /**
//     * This method is called from within the constructor to initialize the form.
//     * WARNING: Do NOT modify this code. The content of this method is always
//     * regenerated by the Form Editor.
//     */
//    @SuppressWarnings("unchecked")
//    // <editor-fold defaultstate="collapsed" desc="Generated Code">//GEN-BEGIN:initComponents
//    private void initComponents() {
//
//        jPanelDatosGenerales = new javax.swing.JPanel();
//        jLabel2 = new javax.swing.JLabel();
//        jTextFieldTitulo = new javax.swing.JTextField();
//        jLabel3 = new javax.swing.JLabel();
//        jTextFieldCliente = new javax.swing.JTextField();
//        jLabel4 = new javax.swing.JLabel();
//        jComboBoxFormato = new javax.swing.JComboBox();
//        jLabel7 = new javax.swing.JLabel();
//        jTextFieldTiraje = new javax.swing.JTextField();
//        jPanelDatosPublicaciones = new javax.swing.JPanel();
//        jLabel8 = new javax.swing.JLabel();
//        jComboBoxPublicacion = new javax.swing.JComboBox();
//        jPanelCambiante = new javax.swing.JPanel();
//        jPanelLibros = new javax.swing.JPanel();
//        jPanelLibroInteriores = new javax.swing.JPanel();
//        jButtonIngresarInterior = new javax.swing.JButton();
//        jScrollPane1 = new javax.swing.JScrollPane();
//        jTableLibroInteriores = new javax.swing.JTable();
//        jButtonQuitarInterior = new javax.swing.JButton();
//        jLabel1 = new javax.swing.JLabel();
//        jTextFieldLibroNumPaginas = new javax.swing.JTextField();
//        jPanelLibroCubierta = new javax.swing.JPanel();
//        jLabel9 = new javax.swing.JLabel();
//        jComboBoxLibroTipoCubierta = new javax.swing.JComboBox();
//        jCheckBoxSolapa = new javax.swing.JCheckBox();
//        jCheckBoxRetira = new javax.swing.JCheckBox();
//        jPanel1 = new javax.swing.JPanel();
//        jLabel5 = new javax.swing.JLabel();
//        jComboBoxCubiertaColorTira = new javax.swing.JComboBox();
//        jLabel10 = new javax.swing.JLabel();
//        jComboBoxCubiertaMaquinaTira = new javax.swing.JComboBox();
//        jPanelCambianteRetira = new javax.swing.JPanel();
//        jPanel4 = new javax.swing.JPanel();
//        jPanel2 = new javax.swing.JPanel();
//        jLabel6 = new javax.swing.JLabel();
//        jComboBoxCubiertaColorRetira = new javax.swing.JComboBox();
//        jLabel11 = new javax.swing.JLabel();
//        jComboBoxCubiertaMaquinaRetira = new javax.swing.JComboBox();
//        jButtonRegistrarCubiertaDatos = new javax.swing.JButton();
//        jPanelVolantes = new javax.swing.JPanel();
//        jButtonCalcular = new javax.swing.JButton();
//        jButtonSalir = new javax.swing.JButton();
//        jMenuBar1 = new javax.swing.JMenuBar();
//        jMenu1 = new javax.swing.JMenu();
//        jMenu3 = new javax.swing.JMenu();
//        jMenu2 = new javax.swing.JMenu();
//
//        setDefaultCloseOperation(javax.swing.WindowConstants.EXIT_ON_CLOSE);
//        setTitle("REGISTRO DE PUBLICACIONES");
//        setResizable(false);
//
//        jPanelDatosGenerales.setBorder(javax.swing.BorderFactory.createTitledBorder("Datos Generales"));
//
//        jLabel2.setText("Titulo:");
//
//        jLabel3.setText("Cliente:");
//
//        jLabel4.setText("Formato:");
//
//        jComboBoxFormato.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "A4", "A5", "Tamaño Especial", "1/2 Oficio" }));
//
//        jLabel7.setText("Tiraje:");
//
//        javax.swing.GroupLayout jPanelDatosGeneralesLayout = new javax.swing.GroupLayout(jPanelDatosGenerales);
//        jPanelDatosGenerales.setLayout(jPanelDatosGeneralesLayout);
//        jPanelDatosGeneralesLayout.setHorizontalGroup(
//            jPanelDatosGeneralesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
//            .addGroup(jPanelDatosGeneralesLayout.createSequentialGroup()
//                .addGap(8, 8, 8)
//                .addGroup(jPanelDatosGeneralesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
//                    .addComponent(jLabel3)
//                    .addComponent(jLabel2))
//                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
//                .addGroup(jPanelDatosGeneralesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
//                    .addComponent(jTextFieldTitulo)
//                    .addComponent(jTextFieldCliente))
//                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
//                .addGroup(jPanelDatosGeneralesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
//                    .addGroup(jPanelDatosGeneralesLayout.createSequentialGroup()
//                        .addComponent(jLabel7)
//                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
//                        .addComponent(jTextFieldTiraje, javax.swing.GroupLayout.PREFERRED_SIZE, 127, javax.swing.GroupLayout.PREFERRED_SIZE))
//                    .addGroup(jPanelDatosGeneralesLayout.createSequentialGroup()
//                        .addComponent(jLabel4)
//                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
//                        .addComponent(jComboBoxFormato, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
//                .addContainerGap())
//        );
//        jPanelDatosGeneralesLayout.setVerticalGroup(
//            jPanelDatosGeneralesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
//            .addGroup(jPanelDatosGeneralesLayout.createSequentialGroup()
//                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
//                .addGroup(jPanelDatosGeneralesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
//                    .addGroup(jPanelDatosGeneralesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
//                        .addComponent(jLabel4)
//                        .addComponent(jComboBoxFormato, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
//                    .addGroup(jPanelDatosGeneralesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
//                        .addComponent(jLabel2)
//                        .addComponent(jTextFieldTitulo, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
//                .addGap(18, 18, Short.MAX_VALUE)
//                .addGroup(jPanelDatosGeneralesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
//                    .addGroup(jPanelDatosGeneralesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
//                        .addComponent(jLabel7)
//                        .addComponent(jTextFieldTiraje, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
//                    .addGroup(jPanelDatosGeneralesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
//                        .addComponent(jLabel3)
//                        .addComponent(jTextFieldCliente, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)))
//                .addContainerGap())
//        );
//
//        jPanelDatosPublicaciones.setBorder(javax.swing.BorderFactory.createTitledBorder("Datos Especificos"));
//
//        jLabel8.setText("Tipo de Publicacion:");
//
//        jComboBoxPublicacion.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "Libros", "Volantes", "Dipticos", "Tripticos" }));
//        jComboBoxPublicacion.addItemListener(new java.awt.event.ItemListener() {
//            public void itemStateChanged(java.awt.event.ItemEvent evt) {
//                jComboBoxPublicacionItemStateChanged(evt);
//            }
//        });
//
//        jPanelCambiante.setLayout(new java.awt.CardLayout());
//
//        jPanelLibroInteriores.setBorder(javax.swing.BorderFactory.createTitledBorder("Interiores"));
//
//        jButtonIngresarInterior.setText("Ingresar Interior");
//        jButtonIngresarInterior.addActionListener(new java.awt.event.ActionListener() {
//            public void actionPerformed(java.awt.event.ActionEvent evt) {
//                jButtonIngresarInteriorActionPerformed(evt);
//            }
//        });
//
//        jTableLibroInteriores.setModel(new javax.swing.table.DefaultTableModel(
//            new Object [][] {
//
//            },
//            new String [] {
//                "Pliegos", "Color Tira", "Maquina T", "Color Retira", "Maquina R"
//            }
//        ) {
//            boolean[] canEdit = new boolean [] {
//                false, false, true, false, false
//            };
//
//            public boolean isCellEditable(int rowIndex, int columnIndex) {
//                return canEdit [columnIndex];
//            }
//        });
//        jScrollPane1.setViewportView(jTableLibroInteriores);
//
//        jButtonQuitarInterior.setText("Quitar Interior");
//        jButtonQuitarInterior.addActionListener(new java.awt.event.ActionListener() {
//            public void actionPerformed(java.awt.event.ActionEvent evt) {
//                jButtonQuitarInteriorActionPerformed(evt);
//            }
//        });
//
//        jLabel1.setText("N° de Paginas:");
//
//        jTextFieldLibroNumPaginas.addKeyListener(new java.awt.event.KeyAdapter() {
//            public void keyReleased(java.awt.event.KeyEvent evt) {
//                jTextFieldLibroNumPaginasKeyReleased(evt);
//            }
//        });
//
//        javax.swing.GroupLayout jPanelLibroInterioresLayout = new javax.swing.GroupLayout(jPanelLibroInteriores);
//        jPanelLibroInteriores.setLayout(jPanelLibroInterioresLayout);
//        jPanelLibroInterioresLayout.setHorizontalGroup(
//            jPanelLibroInterioresLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
//            .addGroup(jPanelLibroInterioresLayout.createSequentialGroup()
//                .addContainerGap()
//                .addGroup(jPanelLibroInterioresLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
//                    .addComponent(jScrollPane1)
//                    .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelLibroInterioresLayout.createSequentialGroup()
//                        .addComponent(jLabel1)
//                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
//                        .addComponent(jTextFieldLibroNumPaginas, javax.swing.GroupLayout.PREFERRED_SIZE, 99, javax.swing.GroupLayout.PREFERRED_SIZE)
//                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
//                        .addComponent(jButtonIngresarInterior)
//                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
//                        .addComponent(jButtonQuitarInterior)))
//                .addContainerGap())
//        );
//
//        jPanelLibroInterioresLayout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jButtonIngresarInterior, jButtonQuitarInterior});
//
//        jPanelLibroInterioresLayout.setVerticalGroup(
//            jPanelLibroInterioresLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
//            .addGroup(jPanelLibroInterioresLayout.createSequentialGroup()
//                .addGroup(jPanelLibroInterioresLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
//                    .addComponent(jButtonIngresarInterior)
//                    .addComponent(jButtonQuitarInterior)
//                    .addComponent(jLabel1)
//                    .addComponent(jTextFieldLibroNumPaginas, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
//                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
//                .addComponent(jScrollPane1, javax.swing.GroupLayout.DEFAULT_SIZE, 54, Short.MAX_VALUE)
//                .addContainerGap())
//        );
//
//        jPanelLibroCubierta.setBorder(javax.swing.BorderFactory.createTitledBorder("Cubierta"));
//
//        jLabel9.setText("Tipo:");
//
//        jComboBoxLibroTipoCubierta.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "COUCHE_BRILLANTE", "COUCHE_MATE" }));
//
//        jCheckBoxSolapa.setText("Solapa");
//
//        jCheckBoxRetira.setText("Retira");
//        jCheckBoxRetira.addItemListener(new java.awt.event.ItemListener() {
//            public void itemStateChanged(java.awt.event.ItemEvent evt) {
//                jCheckBoxRetiraItemStateChanged(evt);
//            }
//        });
//
//        jPanel1.setBorder(javax.swing.BorderFactory.createTitledBorder("Tira"));
//
//        jLabel5.setText("Color:");
//
//        jComboBoxCubiertaColorTira.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "UNO", "DOS", "CUATRO" }));
//
//        jLabel10.setText("Maquina:");
//
//        jComboBoxCubiertaMaquinaTira.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "ROTAPRINT", "ROLAND", "DAVIDSON" }));
//
//        javax.swing.GroupLayout jPanel1Layout = new javax.swing.GroupLayout(jPanel1);
//        jPanel1.setLayout(jPanel1Layout);
//        jPanel1Layout.setHorizontalGroup(
//            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
//            .addGroup(jPanel1Layout.createSequentialGroup()
//                .addContainerGap()
//                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
//                    .addComponent(jLabel10)
//                    .addComponent(jLabel5))
//                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
//                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
//                    .addComponent(jComboBoxCubiertaMaquinaTira, 0, 229, Short.MAX_VALUE)
//                    .addComponent(jComboBoxCubiertaColorTira, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
//        );
//        jPanel1Layout.setVerticalGroup(
//            jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
//            .addGroup(jPanel1Layout.createSequentialGroup()
//                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
//                    .addComponent(jLabel5)
//                    .addComponent(jComboBoxCubiertaColorTira, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
//                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
//                .addGroup(jPanel1Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
//                    .addComponent(jLabel10)
//                    .addComponent(jComboBoxCubiertaMaquinaTira, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
//                .addContainerGap())
//        );
//
//        jPanelCambianteRetira.setLayout(new java.awt.CardLayout());
//
//        javax.swing.GroupLayout jPanel4Layout = new javax.swing.GroupLayout(jPanel4);
//        jPanel4.setLayout(jPanel4Layout);
//        jPanel4Layout.setHorizontalGroup(
//            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
//            .addGap(0, 319, Short.MAX_VALUE)
//        );
//        jPanel4Layout.setVerticalGroup(
//            jPanel4Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
//            .addGap(0, 106, Short.MAX_VALUE)
//        );
//
//        jPanelCambianteRetira.add(jPanel4, "Sin Retira");
//
//        jPanel2.setBorder(javax.swing.BorderFactory.createTitledBorder("Retira"));
//
//        jLabel6.setText("Color:");
//
//        jComboBoxCubiertaColorRetira.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "UNO", "DOS", "CUATRO" }));
//
//        jLabel11.setText("Maquina:");
//
//        jComboBoxCubiertaMaquinaRetira.setModel(new javax.swing.DefaultComboBoxModel(new String[] { "ROTAPRINT", "ROLAND", "DAVIDSON" }));
//
//        javax.swing.GroupLayout jPanel2Layout = new javax.swing.GroupLayout(jPanel2);
//        jPanel2.setLayout(jPanel2Layout);
//        jPanel2Layout.setHorizontalGroup(
//            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
//            .addGroup(jPanel2Layout.createSequentialGroup()
//                .addContainerGap()
//                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.TRAILING)
//                    .addComponent(jLabel11)
//                    .addComponent(jLabel6))
//                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
//                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
//                    .addComponent(jComboBoxCubiertaMaquinaRetira, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
//                    .addComponent(jComboBoxCubiertaColorRetira, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)))
//        );
//        jPanel2Layout.setVerticalGroup(
//            jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
//            .addGroup(jPanel2Layout.createSequentialGroup()
//                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
//                    .addComponent(jLabel6)
//                    .addComponent(jComboBoxCubiertaColorRetira, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
//                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
//                .addGroup(jPanel2Layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
//                    .addComponent(jLabel11)
//                    .addComponent(jComboBoxCubiertaMaquinaRetira, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
//                .addContainerGap())
//        );
//
//        jPanelCambianteRetira.add(jPanel2, "Con Retira");
//
//        jButtonRegistrarCubiertaDatos.setText("Registrar datos y cubierta");
//        jButtonRegistrarCubiertaDatos.addActionListener(new java.awt.event.ActionListener() {
//            public void actionPerformed(java.awt.event.ActionEvent evt) {
//                jButtonRegistrarCubiertaDatosActionPerformed(evt);
//            }
//        });
//
//        javax.swing.GroupLayout jPanelLibroCubiertaLayout = new javax.swing.GroupLayout(jPanelLibroCubierta);
//        jPanelLibroCubierta.setLayout(jPanelLibroCubiertaLayout);
//        jPanelLibroCubiertaLayout.setHorizontalGroup(
//            jPanelLibroCubiertaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
//            .addGroup(jPanelLibroCubiertaLayout.createSequentialGroup()
//                .addContainerGap()
//                .addGroup(jPanelLibroCubiertaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
//                    .addGroup(jPanelLibroCubiertaLayout.createSequentialGroup()
//                        .addComponent(jLabel9)
//                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
//                        .addComponent(jComboBoxLibroTipoCubierta, javax.swing.GroupLayout.PREFERRED_SIZE, 499, javax.swing.GroupLayout.PREFERRED_SIZE)
//                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
//                        .addComponent(jCheckBoxSolapa)
//                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
//                        .addComponent(jCheckBoxRetira))
//                    .addGroup(jPanelLibroCubiertaLayout.createSequentialGroup()
//                        .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
//                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
//                        .addComponent(jPanelCambianteRetira, javax.swing.GroupLayout.PREFERRED_SIZE, 319, javax.swing.GroupLayout.PREFERRED_SIZE))
//                    .addComponent(jButtonRegistrarCubiertaDatos))
//                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
//        );
//        jPanelLibroCubiertaLayout.setVerticalGroup(
//            jPanelLibroCubiertaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
//            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelLibroCubiertaLayout.createSequentialGroup()
//                .addContainerGap()
//                .addGroup(jPanelLibroCubiertaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
//                    .addComponent(jLabel9)
//                    .addComponent(jComboBoxLibroTipoCubierta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
//                    .addComponent(jCheckBoxSolapa)
//                    .addComponent(jCheckBoxRetira))
//                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
//                .addGroup(jPanelLibroCubiertaLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
//                    .addComponent(jPanel1, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
//                    .addComponent(jPanelCambianteRetira, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
//                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
//                .addComponent(jButtonRegistrarCubiertaDatos)
//                .addContainerGap())
//        );
//
//        javax.swing.GroupLayout jPanelLibrosLayout = new javax.swing.GroupLayout(jPanelLibros);
//        jPanelLibros.setLayout(jPanelLibrosLayout);
//        jPanelLibrosLayout.setHorizontalGroup(
//            jPanelLibrosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
//            .addGroup(jPanelLibrosLayout.createSequentialGroup()
//                .addContainerGap()
//                .addGroup(jPanelLibrosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
//                    .addComponent(jPanelLibroInteriores, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
//                    .addGroup(jPanelLibrosLayout.createSequentialGroup()
//                        .addComponent(jPanelLibroCubierta, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
//                        .addContainerGap())))
//        );
//        jPanelLibrosLayout.setVerticalGroup(
//            jPanelLibrosLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
//            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, jPanelLibrosLayout.createSequentialGroup()
//                .addContainerGap()
//                .addComponent(jPanelLibroCubierta, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
//                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
//                .addComponent(jPanelLibroInteriores, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
//                .addContainerGap())
//        );
//
//        jPanelCambiante.add(jPanelLibros, "Libros");
//
//        javax.swing.GroupLayout jPanelVolantesLayout = new javax.swing.GroupLayout(jPanelVolantes);
//        jPanelVolantes.setLayout(jPanelVolantesLayout);
//        jPanelVolantesLayout.setHorizontalGroup(
//            jPanelVolantesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
//            .addGap(0, 730, Short.MAX_VALUE)
//        );
//        jPanelVolantesLayout.setVerticalGroup(
//            jPanelVolantesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
//            .addGap(0, 378, Short.MAX_VALUE)
//        );
//
//        jPanelCambiante.add(jPanelVolantes, "Volantes");
//
//        javax.swing.GroupLayout jPanelDatosPublicacionesLayout = new javax.swing.GroupLayout(jPanelDatosPublicaciones);
//        jPanelDatosPublicaciones.setLayout(jPanelDatosPublicacionesLayout);
//        jPanelDatosPublicacionesLayout.setHorizontalGroup(
//            jPanelDatosPublicacionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
//            .addGroup(jPanelDatosPublicacionesLayout.createSequentialGroup()
//                .addContainerGap()
//                .addGroup(jPanelDatosPublicacionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
//                    .addComponent(jPanelCambiante, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
//                    .addGroup(jPanelDatosPublicacionesLayout.createSequentialGroup()
//                        .addComponent(jLabel8)
//                        .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
//                        .addComponent(jComboBoxPublicacion, 0, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))))
//        );
//        jPanelDatosPublicacionesLayout.setVerticalGroup(
//            jPanelDatosPublicacionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
//            .addGroup(jPanelDatosPublicacionesLayout.createSequentialGroup()
//                .addContainerGap()
//                .addGroup(jPanelDatosPublicacionesLayout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
//                    .addComponent(jLabel8)
//                    .addComponent(jComboBoxPublicacion, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE))
//                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
//                .addComponent(jPanelCambiante, javax.swing.GroupLayout.PREFERRED_SIZE, 378, javax.swing.GroupLayout.PREFERRED_SIZE)
//                .addContainerGap())
//        );
//
//        jButtonCalcular.setText("Calcular");
//        jButtonCalcular.addActionListener(new java.awt.event.ActionListener() {
//            public void actionPerformed(java.awt.event.ActionEvent evt) {
//                jButtonCalcularActionPerformed(evt);
//            }
//        });
//
//        jButtonSalir.setText("Salir");
//
//        jMenu1.setText("Publicaciones");
//
//        jMenu3.setText("Libro");
//        jMenu1.add(jMenu3);
//
//        jMenuBar1.add(jMenu1);
//
//        jMenu2.setText("Otros");
//        jMenuBar1.add(jMenu2);
//
//        setJMenuBar(jMenuBar1);
//
//        javax.swing.GroupLayout layout = new javax.swing.GroupLayout(getContentPane());
//        getContentPane().setLayout(layout);
//        layout.setHorizontalGroup(
//            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
//            .addGroup(javax.swing.GroupLayout.Alignment.TRAILING, layout.createSequentialGroup()
//                .addContainerGap(javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
//                .addComponent(jButtonSalir)
//                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.UNRELATED)
//                .addComponent(jButtonCalcular)
//                .addGap(41, 41, 41))
//            .addGroup(layout.createSequentialGroup()
//                .addContainerGap()
//                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
//                    .addComponent(jPanelDatosGenerales, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
//                    .addComponent(jPanelDatosPublicaciones, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE))
//                .addContainerGap())
//        );
//
//        layout.linkSize(javax.swing.SwingConstants.HORIZONTAL, new java.awt.Component[] {jButtonCalcular, jButtonSalir});
//
//        layout.setVerticalGroup(
//            layout.createParallelGroup(javax.swing.GroupLayout.Alignment.LEADING)
//            .addGroup(layout.createSequentialGroup()
//                .addContainerGap()
//                .addComponent(jPanelDatosGenerales, javax.swing.GroupLayout.PREFERRED_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.PREFERRED_SIZE)
//                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
//                .addComponent(jPanelDatosPublicaciones, javax.swing.GroupLayout.DEFAULT_SIZE, javax.swing.GroupLayout.DEFAULT_SIZE, Short.MAX_VALUE)
//                .addPreferredGap(javax.swing.LayoutStyle.ComponentPlacement.RELATED)
//                .addGroup(layout.createParallelGroup(javax.swing.GroupLayout.Alignment.BASELINE)
//                    .addComponent(jButtonCalcular)
//                    .addComponent(jButtonSalir))
//                .addContainerGap())
//        );
//
//        pack();
//    }// </editor-fold>//GEN-END:initComponents
//
//    private void jComboBoxPublicacionItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jComboBoxPublicacionItemStateChanged
//        // TODO add your handling code here:
//        CardLayout cl = (CardLayout)(jPanelCambiante.getLayout());
//        cl.show(jPanelCambiante, (String)evt.getItem());
//    }//GEN-LAST:event_jComboBoxPublicacionItemStateChanged
//
//    private void jCheckBoxRetiraItemStateChanged(java.awt.event.ItemEvent evt) {//GEN-FIRST:event_jCheckBoxRetiraItemStateChanged
//        // TODO add your handling code here:
//        CardLayout cl = (CardLayout)(jPanelCambianteRetira.getLayout());
//        if (evt.getStateChange() == ItemEvent.SELECTED) {
//            cl.show(jPanelCambianteRetira, "Con Retira");
//        } else if (evt.getStateChange() == ItemEvent.DESELECTED) {
//            cl.show(jPanelCambianteRetira, "Sin Retira");
//        }
//    }//GEN-LAST:event_jCheckBoxRetiraItemStateChanged
//
//    private void jTextFieldLibroNumPaginasKeyReleased(java.awt.event.KeyEvent evt) {//GEN-FIRST:event_jTextFieldLibroNumPaginasKeyReleased
//        // TODO add your handling code here:
//        String f = jTextFieldLibroNumPaginas.getText();
//        //jLabel12.setText(f);
//    }//GEN-LAST:event_jTextFieldLibroNumPaginasKeyReleased
//
//    private void jButtonIngresarInteriorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonIngresarInteriorActionPerformed
//        // TODO add your handling code here:
//        
//        //forma.setPliegos(libro.calcularPliegos());
//        DefaultTableModel model = (DefaultTableModel) jTableLibroInteriores.getModel();
//        int result = JOptionPane.showConfirmDialog(null, forma,
//               "Ingresar Interior", JOptionPane.OK_CANCEL_OPTION);
//        
//        if (result == JOptionPane.OK_OPTION) {
//
//            //model.addRow(new Object[]{i.getNumPliegos(), i.getcTira(),i.getMaquinasInterior().get(0).getNombre(),i.getcRetira(),i.getMaquinasInterior().get(1).getNombre()});
//            model.addRow(new Object[]{forma.getPliegos(), forma.getColorTira(),forma.getMaquinaTira(),
//                forma.getColorRetira(),forma.getMaquinaRetira()});
//      
//      }
//    }//GEN-LAST:event_jButtonIngresarInteriorActionPerformed
//
//    private void jButtonQuitarInteriorActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonQuitarInteriorActionPerformed
//        // TODO add your handling code here:
//        DefaultTableModel model = (DefaultTableModel) jTableLibroInteriores.getModel();
//        model.removeRow(jTableLibroInteriores.getSelectedRow());
//    }//GEN-LAST:event_jButtonQuitarInteriorActionPerformed
//
//    private void jButtonRegistrarCubiertaDatosActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonRegistrarCubiertaDatosActionPerformed
////        // TODO add your handling code here:
////        
////        // extrae datos de publicacion
////        String titulo = jTextFieldTitulo.getText();
////        String cliente = jTextFieldCliente.getText();
////        Formato formato = Formato.getEnum(jComboBoxFormato.getSelectedItem().toString());
////        Integer tiraje = Integer.parseInt(jTextFieldTiraje.getText());
////        
////        //CUBIERTA
////        //extrae datos cubierta
////        TCubierta tipoCubierta = TCubierta.valueOf(jComboBoxLibroTipoCubierta.getSelectedItem().toString()) ;
////        Color cTira = Color.valueOf(jComboBoxCubiertaColorTira.getSelectedItem().toString()) ;
////        Color cRetira = Color.valueOf(jComboBoxCubiertaColorRetira.getSelectedItem().toString()) ;
////        
////        //crea maquinas para cubierta
////        Maquina Cubierta_maquina_tira = new Maquina(NMaquina.valueOf(jComboBoxCubiertaMaquinaTira.getSelectedItem().toString()));
////        Maquina Cubierta_maquina_retira = new Maquina(NMaquina.valueOf(jComboBoxCubiertaMaquinaRetira.getSelectedItem().toString()));
////        
////        //crea cubierta
////        Cubierta cubierta = new Cubierta(tipoCubierta,cTira,cRetira);
////        
////        //añade las maquinas correspondientes a la cubierta
////        cubierta.setmTira(Cubierta_maquina_tira);
////        cubierta.setmRetira(Cubierta_maquina_retira);
////        
////
////        //datos libro
////        boolean solapa = jCheckBoxSolapa.isSelected();
////        Integer numPaginas = Integer.parseInt(jTextFieldLibroNumPaginas.getText());
////        
////        //crea libro y vincula con la cubierta
////        libro = new Libro(solapa,numPaginas,titulo,cliente,formato,tiraje,cubierta);
////        
////        //vincula cubierta con libro
////        cubierta.setPub(libro);
//   
//    }//GEN-LAST:event_jButtonRegistrarCubiertaDatosActionPerformed
//
//    private void jButtonCalcularActionPerformed(java.awt.event.ActionEvent evt) {//GEN-FIRST:event_jButtonCalcularActionPerformed
//        // TODO add your handling code here:
//                    //extraemos datos de la interfaz
//            //Double pliegosTotal = Double.parseDouble(forma.getPliegosTotal());
//            
//
//            //verificar que pliegos de interior total sea menor que el total de pliegos
////            if (pliegosInterior > pliegosTotal) {
////                JOptionPane.showMessageDialog(null,"Ingresar Interior","Error", JOptionPane.ERROR_MESSAGE);
////            } else {
//            
////            for (int i = 0; i < jTableLibroInteriores.getRowCount(); i++) {
////                    
////                // get pliegos
////                    Double pliegosInterior = Double.parseDouble(jTableLibroInteriores.getModel().getValueAt(i, 0).toString());
////                    
////                    // get color tira
////                    Color cTiraInterior = Color.valueOf(jTableLibroInteriores.getModel().getValueAt(i, 1).toString());
////                    // get maquina tira
////                    Maquina interiorMaquinaTira = new Maquina(NMaquina.valueOf(jTableLibroInteriores.getModel().getValueAt(i, 2).toString()));
////                    
////                    // get color retira
////                    Color cRetiraInterior = Color.valueOf(jTableLibroInteriores.getModel().getValueAt(i, 3).toString());
////                    // get maquina retira
////                    Maquina interiorMaquinaRetira = new Maquina(NMaquina.valueOf(jTableLibroInteriores.getModel().getValueAt(i, 4).toString()));
////                    
////                    //creamos un interior
////                    Interior inte = new Interior(pliegosInterior,cTiraInterior,cRetiraInterior);
////                    
////                    //añade maquinas del interior
////                    inte.setmTira(interiorMaquinaTira);
////                    inte.setmRetira(interiorMaquinaRetira);
////                    
////                    inte.setPub(libro);
////                
////            }
////            //}
////            
////            Calculos dialog = new Calculos(this, true);
////            
////            DecimalFormat df = new DecimalFormat("#.##");
////            
////            dialog.getjLabelPlacas().setText(df.format(libro.getCubierta().calcularPlacas()));
////            dialog.getjLabelTiempo().setText(df.format(libro.getCubierta().calcularTiempoImpresion()));
////            
////            dialog.setLocationRelativeTo(this);
////            dialog.setVisible(true);
//        
//    }//GEN-LAST:event_jButtonCalcularActionPerformed
//
//    /**
//     * @param args the command line arguments
//     */
////    public static void main(String args[]) {
////        /* Set the Nimbus look and feel */
////        //<editor-fold defaultstate="collapsed" desc=" Look and feel setting code (optional) ">
////        /* If Nimbus (introduced in Java SE 6) is not available, stay with the default look and feel.
////         * For details see http://download.oracle.com/javase/tutorial/uiswing/lookandfeel/plaf.html 
////         */
////        try {
////            //UIManager.setLookAndFeel("com.sun.java.swing.plaf.windows.WindowsLookAndFeel");
////            //UIManager.setLookAndFeel("javax.swing.plaf.metal.MetalLookAndFeel");
////            //UIManager.setLookAndFeel("com.sun.java.swing.plaf.motif.MotifLookAndFeel");
////            UIManager.setLookAndFeel("javax.swing.plaf.nimbus.NimbusLookAndFeel");
////        } catch (ClassNotFoundException ex) {
////            java.util.logging.Logger.getLogger(Reporte.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
////        } catch (InstantiationException ex) {
////            java.util.logging.Logger.getLogger(Reporte.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
////        } catch (IllegalAccessException ex) {
////            java.util.logging.Logger.getLogger(Reporte.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
////        } catch (javax.swing.UnsupportedLookAndFeelException ex) {
////            java.util.logging.Logger.getLogger(Reporte.class.getName()).log(java.util.logging.Level.SEVERE, null, ex);
////        }
////        
////        UIManager.put("swing.boldMetal", Boolean.FALSE);
////        //</editor-fold>
////
////        /* Create and display the form */
////        java.awt.EventQueue.invokeLater(new Runnable() {
////            @Override
////            public void run() {
////                Reporte reporte = new Reporte();
////                reporte.setLocationRelativeTo(null);
////                reporte.setVisible(true);
////                
////            }
////        });
////    }
//
//    // Variables declaration - do not modify//GEN-BEGIN:variables
//    private javax.swing.JButton jButtonCalcular;
//    private javax.swing.JButton jButtonIngresarInterior;
//    private javax.swing.JButton jButtonQuitarInterior;
//    private javax.swing.JButton jButtonRegistrarCubiertaDatos;
//    private javax.swing.JButton jButtonSalir;
//    private javax.swing.JCheckBox jCheckBoxRetira;
//    private javax.swing.JCheckBox jCheckBoxSolapa;
//    private javax.swing.JComboBox jComboBoxCubiertaColorRetira;
//    private javax.swing.JComboBox jComboBoxCubiertaColorTira;
//    private javax.swing.JComboBox jComboBoxCubiertaMaquinaRetira;
//    private javax.swing.JComboBox jComboBoxCubiertaMaquinaTira;
//    private javax.swing.JComboBox jComboBoxFormato;
//    private javax.swing.JComboBox jComboBoxLibroTipoCubierta;
//    private javax.swing.JComboBox jComboBoxPublicacion;
//    private javax.swing.JLabel jLabel1;
//    private javax.swing.JLabel jLabel10;
//    private javax.swing.JLabel jLabel11;
//    private javax.swing.JLabel jLabel2;
//    private javax.swing.JLabel jLabel3;
//    private javax.swing.JLabel jLabel4;
//    private javax.swing.JLabel jLabel5;
//    private javax.swing.JLabel jLabel6;
//    private javax.swing.JLabel jLabel7;
//    private javax.swing.JLabel jLabel8;
//    private javax.swing.JLabel jLabel9;
//    private javax.swing.JMenu jMenu1;
//    private javax.swing.JMenu jMenu2;
//    private javax.swing.JMenu jMenu3;
//    private javax.swing.JMenuBar jMenuBar1;
//    private javax.swing.JPanel jPanel1;
//    private javax.swing.JPanel jPanel2;
//    private javax.swing.JPanel jPanel4;
//    private javax.swing.JPanel jPanelCambiante;
//    private javax.swing.JPanel jPanelCambianteRetira;
//    private javax.swing.JPanel jPanelDatosGenerales;
//    private javax.swing.JPanel jPanelDatosPublicaciones;
//    private javax.swing.JPanel jPanelLibroCubierta;
//    private javax.swing.JPanel jPanelLibroInteriores;
//    private javax.swing.JPanel jPanelLibros;
//    private javax.swing.JPanel jPanelVolantes;
//    private javax.swing.JScrollPane jScrollPane1;
//    private javax.swing.JTable jTableLibroInteriores;
//    private javax.swing.JTextField jTextFieldCliente;
//    private javax.swing.JTextField jTextFieldLibroNumPaginas;
//    private javax.swing.JTextField jTextFieldTiraje;
//    private javax.swing.JTextField jTextFieldTitulo;
//    // End of variables declaration//GEN-END:variables
//}
